<template>
	<view class="container">
		<uni-list>
			<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" title="昵称" :rightText="user.name" />
			<uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" title="手机号码"
				:rightText="user.phone" />
			<uni-list-item showExtraIcon="true" :extraIcon="{type: 'email-filled'}" title="邮箱" :rightText="user.email" />
			<uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" title="岗位" :rightText="postGroupName" />
			<uni-list-item showExtraIcon="true" :extraIcon="{type: 'staff-filled'}" title="角色" :rightText="roleGroupName" />
			<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" title="创建日期"
				:rightText="user.createTime" />
		</uni-list>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				user: {},
			}
		},
		computed: {
			roleGroupName() {
				return this.user.nature
			},
			postGroupName() {
				return this.user.team
			}
		},
		onLoad() {
			this.getUser()
		},
		methods: {
			getUser() {
				this.user = uni.getStorageSync('userInfo')
				console.log(this.user);
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #ffffff;
	}
</style>